Using Contract Hour in CygNet Measurement

Contract hour is a dynamic property defined as an offset (in hours) from Device time. It applies to device Nodes and to physical Station Group Nodes (Nodes containing devices) from which data can be requested. Contract hour defines when the "contract day" begins and ends, and determines the "Contract time" displayed in FMS controls when Contract time format is selected for data viewing.

Raw data comes into the system in Device time (D). Contract hour is a device configuration parameter (for most devices) used to establish the Contract day and Contract time (C).

Note: To allow physical Station Group Nodes to roll up successfully, make sure that the contract hour value for the physical Station Group Node is equal to the contract hour value for each of its member Nodes.

Executing Data Requests

Request current configuration prior to executing data requests against Nodes, since contract hour is a necessary configuration parameter. In FMS data requests, command parameters for date are based on contract days (C). The contract hour must be known prior to requesting data from devices, which provide data in Device time (D), in order to establish consistent data timestamps.

Note: When polling daily devices with contract hour changes, be aware of the times of scheduled command tasks. If you are moving the contract hour back (earlier), make sure that you do not execute commands for the time period between the old and new contract hour.

Changing Contract Hour

Changing contract hour in FMS is a manual process that must occur whenever device contract hour changes. Edits to contract hour are made on the Time page of the property sheet for Gas Meter, Chromatograph, Liquid Device, or Station Group Nodes. See Viewing and Editing Node Properties for more information.

In general, contract hour can only be changed prior to retrieving data. If data exists past the time to which you desire to change the contract hour, the change cannot be made. The only exception to this is if you must change contract hour for a daily gas metering device, as described in the Exception section below.

Note: Do not execute configuration polls around the time of the contract hour update; wait until all devices and FMS Node properties have been successfully updated. Even if a user creates a new configuration record with the correct offset, a configuration poll that brings back the wrong offset would supersede the user-created record, and could potentially cause problems.

When you change the contract hour for a Node, pressing OK causes the Save FMS Record dialog box to appear, where you can enter record change effective dates and audit information. Make sure that you select an accurate Change begin date for the new contract hour.

Warning: Set the Change begin date with care. Leaving the Change begin date as "Indefinite" (the default) would overwrite all previously set contract hour values for the Node.

If no user edit is executed for a contract hour change, when polling by Contract time (C), the following polling issues could occur.

Record Timestamps

Records for hourly devices are timestamped each hour, whereas records for daily devices are timestamped at the start of each contract day. For devices with contract hour values other than 0, the timestamp will be based on that contract hour value, instead of the 00:00:00 (midnight) default. Each contract hour change will result in device data appearing to contain either a "lean" day, with fewer than 24 hours, or a day ending with a "fat" hour.

Fat Hours

When the contract hour is increased (made later than the current contract hour), it creates a contract day with more than 24 hours of data. When this occurs, all extra hours are rolled into the 24th hour. Therefore a contract day with more than 24 hours of data would appear to have a "fat" 24th hour containing the additional data.

Note: This is only an issue when viewing data in Contract time (C). When viewing data in Device time (D), each record will have the original timestamp.

Exception for Contract Hour Changes

There is an exception to the ability to change contract hour values only before data collection.

For periodic Gas Meter Nodes with "Daily" record spans, it is possible although not recommended to change the contract hour after records have been collected for the affected time span.

In such cases where data exists past the point in time for which you wish the contract hour change to be effective, all history must first be purged back to the intended contract hour change date and time and then, after the contract hour change, data must be recollected for the purged time period, as follows.

To Change Contract Hour for Daily Gas Meter Devices with Existing Records in the Affected Time Span

Monitoring Changes to Contract Hour

If desired, you can create a validation rule to help you monitor changes made to device configuration contract hour values. Setting up a configuration data validation rule for Config Change (Contract Hour) will cause an exception when a poll for configuration or events is executed after the contract hour change occurs. The exceptions generated can be viewed on the Exceptions control in FMS Explorer.

See Managing Validation Engines for more information.

Back to top